<script src="<?php echo site_url() ?>assets/js/jquery-2.0.2.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?php echo $baseurl;?>assets/chosen_v1.4.2/prism.css">
<link rel="stylesheet" href="<?php echo $baseurl;?>assets/chosen_v1.4.2/chosen.css">
<table class="s3basicedit wiform">
<tbody>
<tr>
<td colspan="2">
<h2 class="s3">Thêm admin thiết bị</h2>
<hr style="margin-top: -2px" class="s3"/></td>
</tr>
<tr class="base">
<input type="hidden" name="id" value="0"/>
<input type="hidden" name="type" value="add"/>
</tr>
<tr class="top">
<td class="s3l align-right">Tên đăng nhập <span style="color: red;">(*)</span>:</td>
<td class="s3w"><input type="text" value="<?php echo $this->input->post('username')?>" name="username" id="username" class="w99"/></td>
</tr>
<tr class="top">
<td class="s3l align-right">Mật khẩu <span style="color: red;">(*)</span>:</td>
<td class="s3w"><input type="password" value="<?php echo $this->input->post('password')?>" name="password" id="password" class="w99"/></td>
</tr>
<tr class="top">
<td class="s3l align-right">Địa chỉ email <span style="color: red;">(*)</span>:</td>
<td class="s3w"><input type="text" value="<?php echo $this->input->post('email')?>" name="email" id="email" class="w99"/></td>
</tr>
<tr class="top">
<td class="s3l align-right">Số điện thoại <span style="color: red;">(*)</span>:</td>
<td class="s3w"><input type="text" value="<?php echo $this->input->post('mobile')?>" name="mobile" id="mobile" class="w99"/></td>
</tr>
<tr class="top">
<td class="s3l align-right">Họ tên <span style="color: red;">(*)</span>:</td>
<td class="s3w"><input type="text" value="<?php echo $this->input->post('fullname')?>" name="fullname" id="fullname" class="w99"/></td>
</tr>
<tr class="top">
<td class="s3l align-right">Nhóm quản lý <span style="color: red;">(*)</span>:</td>
<td class="s3w"><?php echo $fview->selectOptionOb($getGroup, $this->input->post('manage_group_id'), 'w99', 'manage_group_id', 'manage_group_id');?></td>
</tr>
<tr id="" class="top" <?php if( $this->session->userdata('level') == 1 ){ ?> style="display:;" <?php } ?> >
<td class="s3l align-right">Thiết bị quản lý <span style="color: red;">(*)</span>:</td>
<td class="s3w" id="thietbiquanly">
<select data-placeholder="Chọn thiết bị..." name="arr_device_id[]" id="arr_device_id" class="chosen-select" multiple="multiple" style="width:350px;" tabindex="4">
<option value=""></option>
<?php foreach ( $getDevice AS $el=>$le ){ ?>
<option value="<?php echo $le->id;?>"><?php echo $le->namedevice;?></option>
<?php } ?>
</select>
</td>
</tr>
<tr class="top">
 <td class="s3l align-right">Đồng bộ Wicity ?</td>
 <td class="s3w">
    <input type="checkbox" name="sync" id="sync" value="1"/>
 </td>
</tr> 
<tr class="base">
<td colspan="2" class="s3actions">
<div>
<table style="margin: 0.5ex auto 0.5ex auto" class="lean">
<tbody>
<tr>
<td><input type="submit" id="submit" value="Tạo mới"/> <input class="cancelaj" type="reset" value="Làm lại"/></td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
<script src="<?php echo $baseurl;?>assets/chosen_v1.4.2/chosen.jquery.js" type="text/javascript"></script>
<script src="<?php echo $baseurl;?>assets/chosen_v1.4.2/prism.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
var config = {
    ".chosen-select": {},
    ".chosen-select-deselect"  : {allow_single_deselect:true},
    ".chosen-select-no-single" : {disable_search_threshold:10},
    ".chosen-select-no-results": {no_results_text:"Oops, nothing found!"},
    ".chosen-select-width"     : {width:"95%"} };
    
    for (var selector in config) {$(selector).chosen(config[selector]);}
    </script>